﻿@model GameSchool.Models.Assignment

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="well">
	@using (Html.BeginForm()) {
		@Html.ValidationSummary(true)
		<fieldset>
			<legend>Skrá verkefni</legend>
                
			<div class="editor-label">
				@Html.Label("Titill")
			</div>
			<div class="editor-field">
				@Html.EditorFor(model => model.Title)
				@Html.ValidationMessageFor(model => model.Title)
			</div>

			<div class="editor-label">
				@Html.Label("Verkefnalýsing")
			</div>
			<div class="editor-field">
				@Html.EditorFor(model => model.Description)
				@Html.ValidationMessageFor(model => model.Description)
			</div>

			<div class="editor-label">
				@Html.Label("Skilafrestur, á forminu dd/mm/áááá")
			</div>
			<div class="editor-field">
				@Html.EditorFor(model => model.Deadline)
				@Html.ValidationMessageFor(model => model.Deadline)
			</div>

			<div class="editor-label">
				@Html.Label("Vægi (%)")
			</div>
			<div class="editor-field">
				@Html.EditorFor(model => model.Percentage)
				@Html.ValidationMessageFor(model => model.Percentage)
			</div>

			<div class="editor-label">
				@Html.Label("Leyfðar skrár")
			</div>
			<div class="editor-field">
				@Html.EditorFor(model => model.AllowedTypes)
				@Html.ValidationMessageFor(model => model.AllowedTypes)
			</div>

			<div class="editor-label">
				@Html.Label("Borð")
			</div>
			<div class="editor-field">
				@Html.DropDownListFor(model => model.LevelID, ViewData["listOfLevels"] as SelectList, "Veldu...")
			</div>

			<div class="editor-label">
				@Html.Label("Stig fyrir skil")
			</div>
			<div class="editor-field">
				@Html.EditorFor(model => model.Points)
				@Html.ValidationMessageFor(model => model.Points)
			</div>

			<div class="editor-label">
				@Html.Label("Sýnilegt")
			</div>
			<div class="editor-field">
				@Html.DropDownListFor(model => model.Visible, ViewData["visible"] as SelectList)
			</div>

			 <div class="editor-field">
				@Html.Hidden("GameID", ViewData["currGame"])
				@Html.ValidationMessageFor(model => model.GameID)
			</div>

			<p>
				<div class="form-actions">
					<input type="submit" class="btn btn-primary" value="Vista">
				</div>
			</p>
		</fieldset>
	}
</div>

